const { defineConfig } = require('@vue/cli-service')
const path = require('path')
function resolve(dir) {
  return path.join(__dirname, dir)
}
module.exports = defineConfig({
  lintOnSave: false,
  transpileDependencies: true,
  configureWebpack: {
    name: '远能大屏',
    resolve: {
      alias: {
        '@': resolve('src')
      }
    }
  },
  css: {
    // 全局配置 utils.scs，详细配置参考 vue-cli 官网
    loaderOptions: {
      sass: {
        prependData: `@import "@/style/util.scss";`,
      },
    },
  },
  devServer: {
    port: 7070,
    client: {
      overlay: false,
    },
    proxy: {
      '/tent': {
        target: 'http://localhost:8284',
        changeOrigin: true,
        pathRewrite: {
          '^/tent': ''
        }
      }
    }
  }
})
